﻿@model VehicleManagement.Models.Fix
@{
    ViewBag.Title = "Create";
}

<h2></h2>
<link rel="stylesheet" href="@Url.Content("~/Content/css/page_zlb_c_e_d.css")" type="text/css"/>
<link rel="stylesheet" href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" type="text/css"/>

@Html.Partial("_PartviewDrivermanageNav")
<div class="content bc">
    <div class="content_link_warn f12">
        你当前的位置：司机管理&gt&gt &nbsp;&nbsp;司机查询&gt&gt &nbsp;&nbsp;所有司机列表
    </div>
    <div class="content_right fr" id="rightcontent">
        @using (Html.BeginForm())
        {
            @Html.ValidationSummary(true)   
            <fieldset>
                @*<legend></legend>*@
                <div class="OutTitle">
                    <span>维修信息录入</span></div>
                <div class="Box">
                    <div class="SubBox1 mt5 ml15 mr15">
                        <div class="SubTitle">
                            维修基本信息</div>
                        <div class="SubBox-container">
                            <div class="text-wrap">
                                <div class="text-line">
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.CarNumber):</span>
                                        @Html.DropDownListFor(model => model.CarNumber, new SelectList(new[] {"车牌号"}, "车牌号"))
                                        <div class="special-validate">
                                            @Html.ValidationMessageFor(model => model.CarNumber)
                                        </div>
                                    </div>
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.DriverName):</span>
                                        @Html.DropDownListFor(model => model.DriverName, new SelectList(new[] { "司机姓名" }, "司机姓名"))
                                        <div class="validate">
                                            @Html.ValidationMessageFor(model => model.DriverName)
                                        </div>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                                <div class="text-line">
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.InvoiceNo):</span>
                                        @Html.EditorFor(model => model.InvoiceNo)
                                        <div class="validate validate4">
                                            @Html.ValidationMessageFor(model => model.InvoiceNo)
                                        </div>
                                    </div>
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.FixName):</span>
                                        @Html.EditorFor(model => model.FixName)
                                        <div class="validate validate4">
                                            @Html.ValidationMessageFor(model => model.FixName)
                                        </div>
                                    </div>
                                   
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.FixDate):</span>
                                        @Html.EditorFor(model => model.FixDate)
                                        <div class="validate validate4">
                                            @Html.ValidationMessageFor(model => model.FixDate)
                                        </div>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                                <div class="text-line"> 
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.Approval):</span>
                                        @Html.EditorFor(model => model.Approval)
                                        <div class="validate">
                                            @Html.ValidationMessageFor(model => model.Approval)
                                        </div>
                                    </div>
                                    <div class="withValidate">
                                        <span id="numinFixCE">@Html.LabelFor(model => model.Num):</span>
                                        @Html.EditorFor(model => model.Num)
                                        <div class="validate validate2">
                                            @Html.ValidationMessageFor(model => model.Num)
                                        </div>
                                    </div>
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.Price):</span>
                                        @Html.EditorFor(model => model.Price)
                                        <div class="validate validate3">
                                            @Html.ValidationMessageFor(model => model.Price)
                                        </div>
                                    </div>  
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.Cost):</span>
                                        @Html.EditorFor(model => model.Cost)
                                        <div class="validate validate4">
                                            @Html.ValidationMessageFor(model => model.Cost)
                                        </div>
                                    </div>
                                        
                                    <div class="clear"></div>
                                
                            </div>
                            </div>
                        </div>
                    
                    </div>
                    <div class="SubBox2 m15 mt10 mb5">
                        <div class="SubTitle">
                            维修相关信息</div>
                        <div class="SubBox-container">
                            <div class="text-wrap ml5 mb5 mr5">
                                <div class="text-line"> 
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.NextDis):</span>
                                        @Html.EditorFor(model => model.NextDis)
                                        <div class="validate validate5">
                                            @Html.ValidationMessageFor(model => model.NextDis)
                                        </div>
                                    </div>
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.NextFix):</span>
                                        @Html.EditorFor(model => model.NextFix)
                                        <div class="validate validate5">
                                            @Html.ValidationMessageFor(model => model.NextFix)
                                        </div>
                                    </div>
                                    
                                  
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.Distance):</span>
                                        @Html.EditorFor(model => model.Distance)
                                        <div class="validate validate5">
                                            @Html.ValidationMessageFor(model => model.Distance)
                                        </div>
                                    </div> 
                                    <div class="clear"></div>
                               </div>
                                <div class="text-line">
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.FixStaName):</span>
                                        @Html.EditorFor(model => model.FixStaName)
                                        <div class="validate validate5">
                                            @Html.ValidationMessageFor(model => model.FixStaName)
                                        </div>
                                    </div>
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.RegisterDate):</span>
                                        @Html.EditorFor(model => model.RegisterDate)
                                        <div class="validate validate4">
                                            @Html.ValidationMessageFor(model => model.RegisterDate)
                                        </div>
                                    </div>
                                    <div class="withValidate">
                                        <span>@Html.LabelFor(model => model.RegisterPerson):</span>
                                        @Html.EditorFor(model => model.RegisterPerson)
                                        <div class="validate validate3">
                                            @Html.ValidationMessageFor(model => model.RegisterPerson)
                                        </div>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                                <div class="text-line">
                                    <span class="spanType1">@Html.LabelFor(model => model.Remark):</span>
                                    @Html.TextAreaFor(model => model.Remark)
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="button-wrap">
                    <div class="submit-wrap">
                        <div class="divINsubmit">
                            <input class="submit" type="submit" value="创建" /></div>
                    </div>
                    <div class="a-back mr15">
                        <div class="divINa-back">@Html.ActionLink("返回", "Index")</div>
                    </div>
                </div>
            </fieldset>

        }
    </div>
   @Html.Partial("_PartviewCarLeftbar")
    <div class="content_contract fl">
        <a href="javascript:void(0)" class="btn_contract w8h32" id="contract" title="收缩">
        </a><a href="javascript:void(0)" class="btn_expand w8h32" id="expand" title="展开">
        </a>
    </div>
    <div class="cb">
    </div>
</div>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $.post("/Driver/GetDriverNameList", {},
            function (data) {
                $("#DriverName").empty();
                $.each(data, function () {
                    $("#DriverName").append('<option>' + this + '</option>');
                });

            });
        $.post("/CarInfo/GetCarNumberList", {},
            function (data) {
                $("#CarNumber").empty();
                $.each(data, function () {
                    $("#CarNumber").append('<option>' + this + '</option>');
                });

            });
		 document.getElementById("FixDate").setAttribute("readOnly", "true");
            document.getElementById("NextFix").setAttribute("readOnly", "true");
            document.getElementById("RegisterDate").setAttribute("readOnly", "true");
            $.datepicker.regional['zh-CN'] =
        {
            clearText: '清除', clearStatus: '清除已选日期',
            closeText: '关闭', closeStatus: '不改变当前选择',
            prevText: '', prevStatus: '显示上月',
            nextText: '', nextStatus: '显示下月',
            currentText: '今天', currentStatus: '显示本月',
            monthNames: ['一月', '二月', '三月', '四月', '五月', '六月',
        '七月', '八月', '九月', '十月', '十一月', '十二月'],
            monthNamesShort: ['一', '二', '三', '四', '五', '六',
        '七', '八', '九', '十', '十一', '十二'],
            monthStatus: '选择月份', yearStatus: '选择年份',
            weekHeader: '周', weekStatus: '年内周次',
            dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
            dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
            dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
            dayStatus: '设置 DD 为一周起始', dateStatus: '选择 m月 d日, DD',
            dateFormat: 'yy-mm-dd', firstDay: 1,
            initStatus: '请选择日期', isRTL: false
        };
            $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
            $("#FixDate,#RegisterDate,#NextFix").datepicker({
                showOn: "button",
                buttonImage: "/Content/themes/picture/calendar.gif",
                buttonImageOnly: true
            });

    });
</script>
